<template>
	<router-link tag="div" :to="'/bargain/'+bargainItem.id+'/'+bargainItem.goodsId" class="bargain-item">
		<div class="bargain-item-image">
			<img :src="bargainItem.goods.pic" :alt="bargainItem.goods.name">
		</div>
		<div class="bargain-item-detail">
			<div class="bargain-item-detail-title">
				<div class="bargain-item-detail-title" v-html="bargainItem.goods.name"></div>
				<div class="bargain-item-detail-characteristic" v-html="bargainItem.goods.characteristic"></div>
			</div>
			<div class="bargain-item-detail-price">
				<div class="bargain-item-detail-price-min">
					<p>{{bargainItem.goods.minPrice | formatMoney}}</p>
					<p>底价</p>
				</div>
				<div class="bargain-item-detail-price-original">
					<p>{{bargainItem.goods.originalPrice | formatMoney}}</p>
					<p>原价</p>
				</div>
				<div class="bargain-item-detail-price-stores">
					<p>{{bargainItem.goods.stores | formatUnit}}</p>
					<p>限量</p>
				</div>
			</div>
		</div>
	</router-link>
</template>

<script>
	export default {
		name: "BargainItem",
		props: {
			bargainItem: {
				type: Object,
				required: true
			}
		}
	}
</script>
